home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / www / amitrix / awebupgrade.lha / AWebUpgrade.awebrx
Text File  |  1998-06-22  |  4KB  |  106 lines

  1. /* ARexx script to select the correct archive to upgrade to AWeb-II 3.2
  2.  *
  3.  * Run this script from within AWeb-II version 3.x
  4.  */
  5.  
  6. options results
  7.  
  8. if ~show('L','rexxsupport.library') then addlib('rexxsupport.library',0,-30,0)
  9.  
  10. no31=0
  11. ver=0
  12.  
  13. 'get version var awebver'
  14. if left(awebver,3)<3.1 then no31=1
  15.  
  16. if no31 then awebpath='AWeb3:'
  17. else awebpath='AWebPath:'
  18.  
  19. if open(f,'T:awebupgrade.html','W') then do
  20.    call writeln f,'<html><title>AWeb Upgrade</title>'
  21.    call writeln f,'<body background="file:///' || awebpath || 'docs/awebbg.iff">'
  22.    call writeln f,'<img src="file:///' || awebpath || 'docs/aweb.iff" align=left hspace=10>'
  23.    call writeln f,'<h1>Upgrade to AWeb-II 3.2</h1><br clear=all><br><br>'
  24.    call writeln f,'Checking your original AWeb-II disks...'
  25.    call close f
  26.    'open "file:///T:awebupgrade.html" reload'
  27.    'wait all'
  28. end
  29.  
  30. do forever
  31.    'request "AWeb Upgrade" "Put Disk 1 of the original AWeb-II distribution*Ninto any drive" "_Ok|_Cancel"'
  32.    if rc>0 then exit
  33.    volumes=showlist('V')
  34.    if pos('AWEB3.0_DISK1',upper(volumes))>0 then leave
  35.    if pos('AWEB3.1_DISK1',upper(volumes))>0 then do
  36.       ver='3.1'
  37.       leave
  38.    end
  39. end
  40.  
  41. if ver=0 then do
  42.    address command
  43.    'AWeb3.0_Disk1:lhex >nil: -w=T: e AWeb3.0_Disk1:AWeb2.lha AWeb-II'
  44.    'version >t:awebdiskversion T:AWeb-II'
  45.    'delete >nil: T:AWeb-II'
  46.    if open(f,'T:awebdiskversion','R') then do
  47.       version=readln(f)
  48.       call close f
  49.       ver=word(version,2)
  50.    end
  51.    'delete >nil: T:awebdiskversion'
  52.    address
  53. end
  54.  
  55. select
  56.    when ver='3.0' then do
  57.       lha='AWeb3032pch.lha'
  58.       size=495
  59.    end
  60.    when ver='3.0b' then do
  61.       lha='AWeb30b32pch.lha'
  62.       size=495
  63.    end
  64.    when ver='3.1' then do
  65.       lha='AWeb3132pch.lha'
  66.       size=267
  67.    end
  68.    otherwise do
  69.       'request "AWeb Upgrade" "Unknown disk version.*NProgram stopped." "_Ok" NOWAIT'
  70.       exit
  71.    end
  72. end
  73.  
  74. if open(f,'T:awebupgrade.html','W') then do
  75.    call writeln f,'<html><title>AWeb Upgrade</title>'
  76.    call writeln f,'<body background="file:///' || awebpath || 'docs/awebbg.iff">'
  77.    call writeln f,'<img src="file:///' || awebpath || 'docs/aweb.iff" align=left hspace=10>'
  78.    call writeln f,'<h1>Upgrade to AWeb-II 3.2</h1><br clear=all><br><br>'
  79.    if no31 then do
  80.       call writeln f,'You are currently running AWeb-II version ' || awebver || '. The 3.2 patch'
  81.       call writeln f,'archive doesn''t contain all changed documentation and other files'
  82.       call writeln f,'for you. You have to install the AWeb 3.1 patch before you can'
  83.       call writeln f,'successfully upgrade to version 3.2.<br><br>'
  84.       call writeln f,'Download and install the <a href="http://www.amitrix.com/AWeb31pch.lha">'
  85.       call writeln f,'AWeb 3.1 patch</a> (680 kB) first.<br><br>'
  86.       call writeln f,'To install this patch, double-click the "Install-AWeb31" icon.<br>'
  87.       call writeln f,'The installation procedure will need the original disks from the'
  88.       call writeln f,'AWeb-II ' || ver || ' distribution.<br><br>'
  89.       call writeln f,'Then you can install the AWeb-II 3.2 patch (see below).<br><br><hr><br>'
  90.    end
  91.    call writeln f,'Your AWeb-II disks contain version ' || ver || '.<br><br>'
  92.    call writeln f,'To upgrade to AWeb-II 3.2 you need'
  93.    call writeln f,'<a href="http://www.amitrix.com/' || lha || '">' || lha || '</a>'
  94.    call writeln f,'(' || size || ' kB).<br><br>'
  95.    call writeln f,'To install this patch, double-click the "Install-AWeb32" icon.<br>'
  96.    call writeln f,'The installation procedure will need the original disks from the'
  97.    call writeln f,'AWeb-II distribution.<br><br>'
  98.    call writeln f,'</html>'
  99.    call close f
  100.    'open "file:///T:awebupgrade.html" reload'
  101. end
  102. else do
  103.    'request "AWeb Upgrade" "Couldn''t open temporary file.*NProgram stopped." "_Ok" NOWAIT'
  104. end
  105.  
  106.